<?php
/**
 * 	Bushido
 *
 * @category   Bushido
 * @package    Bushido_Controller
 * @subpackage Action
 * @copyright  Copyright (c) 2008-2009 Nathan Keyes
 * @author Nathan Keyes
 * @version    $Id: Page.php 7 2009-11-14 22:42:08Z nkeyes $
 */


/**
 * 
 * @author Nathan Keyes
 *
 */
class Bushido_Controller_Action_Gallery extends Bushido_Controller_Action
{
	
	/**
	 * 
	 * 
	 * @return void
	 */
	public function indexAction() 
	{
		$galleryTable = Bushido_Db_Table::getTable('Bushido_DbTable_Gallery');
		$this->view->galleries = $galleryTable->fetchAll('is_public = 1');
	}
	
	public function viewAction()
	{
		$galleryId = $this->_getParam('gallery_id');
		
		
		$this->view->gallery = Bushido_Db_Table::getTable('Bushido_DbTable_Gallery')->find($galleryId)->current();
	}
}